package com.zxd.threads;

/**
 * ClassName:LambdaRunThread
 * Package:com.zxd.threads
 * 创建线程的匿名内部类形式
 * @Date:2023/9/25 14:22
 * @Author:zxde
 */
public class LambdaRunThread {
    public static void main(String[] args) {
        //启动一个线程
        new Thread(() -> {
            for (int i = 0; i < 5; i++) {
                System.out.println("子线程输出==>" + i);
            }
        }).start();

        for (int i = 0; i < 5; i++) {
            System.out.println("主线程输出==>" + i);
        }
    }
}
